12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937 |
- unit googleiam;
- {$MODE objfpc}
- {$H+}
- interface
- uses sysutils, classes, googleservice, restbase, googlebase;
- type
-
- //Top-level schema types
- TListServiceAccountsResponse = Class;
- TServiceAccount = Class;
- TCreateServiceAccountRequest = Class;
- TEmpty = Class;
- TListServiceAccountKeysResponse = Class;
- TServiceAccountKey = Class;
- TCreateServiceAccountKeyRequest = Class;
- TSignBlobRequest = Class;
- TSignBlobResponse = Class;
- TPolicy = Class;
- TBinding = Class;
- TRule = Class;
- TCondition = Class;
- TLogConfig = Class;
- TCounterOptions = Class;
- TDataAccessOptions = Class;
- TCloudAuditOptions = Class;
- TSetIamPolicyRequest = Class;
- TTestIamPermissionsRequest = Class;
- TTestIamPermissionsResponse = Class;
- TListServiceAccountsResponseArray = Array of TListServiceAccountsResponse;
- TServiceAccountArray = Array of TServiceAccount;
- TCreateServiceAccountRequestArray = Array of TCreateServiceAccountRequest;
- TEmptyArray = Array of TEmpty;
- TListServiceAccountKeysResponseArray = Array of TListServiceAccountKeysResponse;
- TServiceAccountKeyArray = Array of TServiceAccountKey;
- TCreateServiceAccountKeyRequestArray = Array of TCreateServiceAccountKeyRequest;
- TSignBlobRequestArray = Array of TSignBlobRequest;
- TSignBlobResponseArray = Array of TSignBlobResponse;
- TPolicyArray = Array of TPolicy;
- TBindingArray = Array of TBinding;
- TRuleArray = Array of TRule;
- TConditionArray = Array of TCondition;
- TLogConfigArray = Array of TLogConfig;
- TCounterOptionsArray = Array of TCounterOptions;
- TDataAccessOptionsArray = Array of TDataAccessOptions;
- TCloudAuditOptionsArray = Array of TCloudAuditOptions;
- TSetIamPolicyRequestArray = Array of TSetIamPolicyRequest;
- TTestIamPermissionsRequestArray = Array of TTestIamPermissionsRequest;
- TTestIamPermissionsResponseArray = Array of TTestIamPermissionsResponse;
- //Anonymous types, using auto-generated names
- TListServiceAccountsResponseTypeaccountsArray = Array of TServiceAccount;
- TListServiceAccountKeysResponseTypekeysArray = Array of TServiceAccountKey;
- TPolicyTypebindingsArray = Array of TBinding;
- TPolicyTyperulesArray = Array of TRule;
- TRuleTypeconditionsArray = Array of TCondition;
- TRuleTypelogConfigArray = Array of TLogConfig;
-
- { --------------------------------------------------------------------
- TListServiceAccountsResponse
- --------------------------------------------------------------------}
-
- TListServiceAccountsResponse = Class(TGoogleBaseObject)
- Private
- Faccounts : TListServiceAccountsResponseTypeaccountsArray;
- FnextPageToken : String;
- Protected
- //Property setters
- Procedure Setaccounts(AIndex : Integer; const AValue : TListServiceAccountsResponseTypeaccountsArray); virtual;
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property accounts : TListServiceAccountsResponseTypeaccountsArray Index 0 Read Faccounts Write Setaccounts;
- Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
- end;
- TListServiceAccountsResponseClass = Class of TListServiceAccountsResponse;
-
- { --------------------------------------------------------------------
- TServiceAccount
- --------------------------------------------------------------------}
-
- TServiceAccount = Class(TGoogleBaseObject)
- Private
- Fname : String;
- FprojectId : String;
- FuniqueId : String;
- Femail : String;
- FdisplayName : String;
- Fetag : String;
- Foauth2ClientId : String;
- Protected
- //Property setters
- Procedure Setname(AIndex : Integer; const AValue : String); virtual;
- Procedure SetprojectId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetuniqueId(AIndex : Integer; const AValue : String); virtual;
- Procedure Setemail(AIndex : Integer; const AValue : String); virtual;
- Procedure SetdisplayName(AIndex : Integer; const AValue : String); virtual;
- Procedure Setetag(AIndex : Integer; const AValue : String); virtual;
- Procedure Setoauth2ClientId(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property name : String Index 0 Read Fname Write Setname;
- Property projectId : String Index 8 Read FprojectId Write SetprojectId;
- Property uniqueId : String Index 16 Read FuniqueId Write SetuniqueId;
- Property email : String Index 24 Read Femail Write Setemail;
- Property displayName : String Index 32 Read FdisplayName Write SetdisplayName;
- Property etag : String Index 40 Read Fetag Write Setetag;
- Property oauth2ClientId : String Index 48 Read Foauth2ClientId Write Setoauth2ClientId;
- end;
- TServiceAccountClass = Class of TServiceAccount;
-
- { --------------------------------------------------------------------
- TCreateServiceAccountRequest
- --------------------------------------------------------------------}
-
- TCreateServiceAccountRequest = Class(TGoogleBaseObject)
- Private
- FaccountId : String;
- FserviceAccount : TServiceAccount;
- Protected
- //Property setters
- Procedure SetaccountId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetserviceAccount(AIndex : Integer; const AValue : TServiceAccount); virtual;
- Public
- Published
- Property accountId : String Index 0 Read FaccountId Write SetaccountId;
- Property serviceAccount : TServiceAccount Index 8 Read FserviceAccount Write SetserviceAccount;
- end;
- TCreateServiceAccountRequestClass = Class of TCreateServiceAccountRequest;
-
- { --------------------------------------------------------------------
- TEmpty
- --------------------------------------------------------------------}
-
- TEmpty = Class(TGoogleBaseObject)
- Private
- Protected
- //Property setters
- Public
- Published
- end;
- TEmptyClass = Class of TEmpty;
-
- { --------------------------------------------------------------------
- TListServiceAccountKeysResponse
- --------------------------------------------------------------------}
-
- TListServiceAccountKeysResponse = Class(TGoogleBaseObject)
- Private
- Fkeys : TListServiceAccountKeysResponseTypekeysArray;
- Protected
- //Property setters
- Procedure Setkeys(AIndex : Integer; const AValue : TListServiceAccountKeysResponseTypekeysArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property keys : TListServiceAccountKeysResponseTypekeysArray Index 0 Read Fkeys Write Setkeys;
- end;
- TListServiceAccountKeysResponseClass = Class of TListServiceAccountKeysResponse;
-
- { --------------------------------------------------------------------
- TServiceAccountKey
- --------------------------------------------------------------------}
-
- TServiceAccountKey = Class(TGoogleBaseObject)
- Private
- Fname : String;
- FprivateKeyType : String;
- FprivateKeyData : String;
- FvalidAfterTime : String;
- FvalidBeforeTime : String;
- Protected
- //Property setters
- Procedure Setname(AIndex : Integer; const AValue : String); virtual;
- Procedure SetprivateKeyType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetprivateKeyData(AIndex : Integer; const AValue : String); virtual;
- Procedure SetvalidAfterTime(AIndex : Integer; const AValue : String); virtual;
- Procedure SetvalidBeforeTime(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property name : String Index 0 Read Fname Write Setname;
- Property privateKeyType : String Index 8 Read FprivateKeyType Write SetprivateKeyType;
- Property privateKeyData : String Index 16 Read FprivateKeyData Write SetprivateKeyData;
- Property validAfterTime : String Index 24 Read FvalidAfterTime Write SetvalidAfterTime;
- Property validBeforeTime : String Index 32 Read FvalidBeforeTime Write SetvalidBeforeTime;
- end;
- TServiceAccountKeyClass = Class of TServiceAccountKey;
-
- { --------------------------------------------------------------------
- TCreateServiceAccountKeyRequest
- --------------------------------------------------------------------}
-
- TCreateServiceAccountKeyRequest = Class(TGoogleBaseObject)
- Private
- FprivateKeyType : String;
- Protected
- //Property setters
- Procedure SetprivateKeyType(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property privateKeyType : String Index 0 Read FprivateKeyType Write SetprivateKeyType;
- end;
- TCreateServiceAccountKeyRequestClass = Class of TCreateServiceAccountKeyRequest;
-
- { --------------------------------------------------------------------
- TSignBlobRequest
- --------------------------------------------------------------------}
-
- TSignBlobRequest = Class(TGoogleBaseObject)
- Private
- FbytesToSign : String;
- Protected
- //Property setters
- Procedure SetbytesToSign(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property bytesToSign : String Index 0 Read FbytesToSign Write SetbytesToSign;
- end;
- TSignBlobRequestClass = Class of TSignBlobRequest;
-
- { --------------------------------------------------------------------
- TSignBlobResponse
- --------------------------------------------------------------------}
-
- TSignBlobResponse = Class(TGoogleBaseObject)
- Private
- FkeyId : String;
- Fsignature : String;
- Protected
- //Property setters
- Procedure SetkeyId(AIndex : Integer; const AValue : String); virtual;
- Procedure Setsignature(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property keyId : String Index 0 Read FkeyId Write SetkeyId;
- Property signature : String Index 8 Read Fsignature Write Setsignature;
- end;
- TSignBlobResponseClass = Class of TSignBlobResponse;
-
- { --------------------------------------------------------------------
- TPolicy
- --------------------------------------------------------------------}
-
- TPolicy = Class(TGoogleBaseObject)
- Private
- Fversion : integer;
- Fbindings : TPolicyTypebindingsArray;
- Frules : TPolicyTyperulesArray;
- Fetag : String;
- Protected
- //Property setters
- Procedure Setversion(AIndex : Integer; const AValue : integer); virtual;
- Procedure Setbindings(AIndex : Integer; const AValue : TPolicyTypebindingsArray); virtual;
- Procedure Setrules(AIndex : Integer; const AValue : TPolicyTyperulesArray); virtual;
- Procedure Setetag(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property version : integer Index 0 Read Fversion Write Setversion;
- Property bindings : TPolicyTypebindingsArray Index 8 Read Fbindings Write Setbindings;
- Property rules : TPolicyTyperulesArray Index 16 Read Frules Write Setrules;
- Property etag : String Index 24 Read Fetag Write Setetag;
- end;
- TPolicyClass = Class of TPolicy;
-
- { --------------------------------------------------------------------
- TBinding
- --------------------------------------------------------------------}
-
- TBinding = Class(TGoogleBaseObject)
- Private
- Frole : String;
- Fmembers : TStringArray;
- Protected
- //Property setters
- Procedure Setrole(AIndex : Integer; const AValue : String); virtual;
- Procedure Setmembers(AIndex : Integer; const AValue : TStringArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property role : String Index 0 Read Frole Write Setrole;
- Property members : TStringArray Index 8 Read Fmembers Write Setmembers;
- end;
- TBindingClass = Class of TBinding;
-
- { --------------------------------------------------------------------
- TRule
- --------------------------------------------------------------------}
-
- TRule = Class(TGoogleBaseObject)
- Private
- Fdescription : String;
- Fpermissions : TStringArray;
- Faction : String;
- F_in : TStringArray;
- FnotIn : TStringArray;
- Fconditions : TRuleTypeconditionsArray;
- FlogConfig : TRuleTypelogConfigArray;
- Protected
- Class Function ExportPropertyName(Const AName : String) : string; override;
- //Property setters
- Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
- Procedure Setpermissions(AIndex : Integer; const AValue : TStringArray); virtual;
- Procedure Setaction(AIndex : Integer; const AValue : String); virtual;
- Procedure Set_in(AIndex : Integer; const AValue : TStringArray); virtual;
- Procedure SetnotIn(AIndex : Integer; const AValue : TStringArray); virtual;
- Procedure Setconditions(AIndex : Integer; const AValue : TRuleTypeconditionsArray); virtual;
- Procedure SetlogConfig(AIndex : Integer; const AValue : TRuleTypelogConfigArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property description : String Index 0 Read Fdescription Write Setdescription;
- Property permissions : TStringArray Index 8 Read Fpermissions Write Setpermissions;
- Property action : String Index 16 Read Faction Write Setaction;
- Property _in : TStringArray Index 24 Read F_in Write Set_in;
- Property notIn : TStringArray Index 32 Read FnotIn Write SetnotIn;
- Property conditions : TRuleTypeconditionsArray Index 40 Read Fconditions Write Setconditions;
- Property logConfig : TRuleTypelogConfigArray Index 48 Read FlogConfig Write SetlogConfig;
- end;
- TRuleClass = Class of TRule;
-
- { --------------------------------------------------------------------
- TCondition
- --------------------------------------------------------------------}
-
- TCondition = Class(TGoogleBaseObject)
- Private
- Fiam : String;
- Fsys : String;
- Fsvc : String;
- Fop : String;
- Fvalue : String;
- Fvalues : TStringArray;
- Protected
- //Property setters
- Procedure Setiam(AIndex : Integer; const AValue : String); virtual;
- Procedure Setsys(AIndex : Integer; const AValue : String); virtual;
- Procedure Setsvc(AIndex : Integer; const AValue : String); virtual;
- Procedure Setop(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvalues(AIndex : Integer; const AValue : TStringArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property iam : String Index 0 Read Fiam Write Setiam;
- Property sys : String Index 8 Read Fsys Write Setsys;
- Property svc : String Index 16 Read Fsvc Write Setsvc;
- Property op : String Index 24 Read Fop Write Setop;
- Property value : String Index 32 Read Fvalue Write Setvalue;
- Property values : TStringArray Index 40 Read Fvalues Write Setvalues;
- end;
- TConditionClass = Class of TCondition;
-
- { --------------------------------------------------------------------
- TLogConfig
- --------------------------------------------------------------------}
-
- TLogConfig = Class(TGoogleBaseObject)
- Private
- Fcounter : TCounterOptions;
- FdataAccess : TDataAccessOptions;
- FcloudAudit : TCloudAuditOptions;
- Protected
- //Property setters
- Procedure Setcounter(AIndex : Integer; const AValue : TCounterOptions); virtual;
- Procedure SetdataAccess(AIndex : Integer; const AValue : TDataAccessOptions); virtual;
- Procedure SetcloudAudit(AIndex : Integer; const AValue : TCloudAuditOptions); virtual;
- Public
- Published
- Property counter : TCounterOptions Index 0 Read Fcounter Write Setcounter;
- Property dataAccess : TDataAccessOptions Index 8 Read FdataAccess Write SetdataAccess;
- Property cloudAudit : TCloudAuditOptions Index 16 Read FcloudAudit Write SetcloudAudit;
- end;
- TLogConfigClass = Class of TLogConfig;
-
- { --------------------------------------------------------------------
- TCounterOptions
- --------------------------------------------------------------------}
-
- TCounterOptions = Class(TGoogleBaseObject)
- Private
- Fmetric : String;
- Ffield : String;
- Protected
- //Property setters
- Procedure Setmetric(AIndex : Integer; const AValue : String); virtual;
- Procedure Setfield(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property metric : String Index 0 Read Fmetric Write Setmetric;
- Property field : String Index 8 Read Ffield Write Setfield;
- end;
- TCounterOptionsClass = Class of TCounterOptions;
-
- { --------------------------------------------------------------------
- TDataAccessOptions
- --------------------------------------------------------------------}
-
- TDataAccessOptions = Class(TGoogleBaseObject)
- Private
- Protected
- //Property setters
- Public
- Published
- end;
- TDataAccessOptionsClass = Class of TDataAccessOptions;
-
- { --------------------------------------------------------------------
- TCloudAuditOptions
- --------------------------------------------------------------------}
-
- TCloudAuditOptions = Class(TGoogleBaseObject)
- Private
- Protected
- //Property setters
- Public
- Published
- end;
- TCloudAuditOptionsClass = Class of TCloudAuditOptions;
-
- { --------------------------------------------------------------------
- TSetIamPolicyRequest
- --------------------------------------------------------------------}
-
- TSetIamPolicyRequest = Class(TGoogleBaseObject)
- Private
- Fpolicy : TPolicy;
- Protected
- //Property setters
- Procedure Setpolicy(AIndex : Integer; const AValue : TPolicy); virtual;
- Public
- Published
- Property policy : TPolicy Index 0 Read Fpolicy Write Setpolicy;
- end;
- TSetIamPolicyRequestClass = Class of TSetIamPolicyRequest;
-
- { --------------------------------------------------------------------
- TTestIamPermissionsRequest
- --------------------------------------------------------------------}
-
- TTestIamPermissionsRequest = Class(TGoogleBaseObject)
- Private
- Fpermissions : TStringArray;
- Protected
- //Property setters
- Procedure Setpermissions(AIndex : Integer; const AValue : TStringArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property permissions : TStringArray Index 0 Read Fpermissions Write Setpermissions;
- end;
- TTestIamPermissionsRequestClass = Class of TTestIamPermissionsRequest;
-
- { --------------------------------------------------------------------
- TTestIamPermissionsResponse
- --------------------------------------------------------------------}
-
- TTestIamPermissionsResponse = Class(TGoogleBaseObject)
- Private
- Fpermissions : TStringArray;
- Protected
- //Property setters
- Procedure Setpermissions(AIndex : Integer; const AValue : TStringArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property permissions : TStringArray Index 0 Read Fpermissions Write Setpermissions;
- end;
- TTestIamPermissionsResponseClass = Class of TTestIamPermissionsResponse;
-
- { --------------------------------------------------------------------
- TProjectsServiceAccountsKeysResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TProjectsServiceAccountsKeysResource, method List
-
- TProjectsServiceAccountsKeysListOptions = Record
- keyTypes : String;
- end;
-
- TProjectsServiceAccountsKeysResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function List(_name: string; AQuery : string = '') : TListServiceAccountKeysResponse;
- Function List(_name: string; AQuery : TProjectsServiceAccountsKeyslistOptions) : TListServiceAccountKeysResponse;
- Function Get(_name: string) : TServiceAccountKey;
- Function Create(_name: string; aCreateServiceAccountKeyRequest : TCreateServiceAccountKeyRequest) : TServiceAccountKey;overload;
- Function Delete(_name: string) : TEmpty;
- end;
-
-
- { --------------------------------------------------------------------
- TProjectsServiceAccountsResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TProjectsServiceAccountsResource, method List
-
- TProjectsServiceAccountsListOptions = Record
- pageSize : integer;
- pageToken : String;
- end;
-
- TProjectsServiceAccountsResource = Class(TGoogleResource)
- Private
- FKeysInstance : TProjectsServiceAccountsKeysResource;
- Function GetKeysInstance : TProjectsServiceAccountsKeysResource;virtual;
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function List(_name: string; AQuery : string = '') : TListServiceAccountsResponse;
- Function List(_name: string; AQuery : TProjectsServiceAccountslistOptions) : TListServiceAccountsResponse;
- Function Get(_name: string) : TServiceAccount;
- Function Create(_name: string; aCreateServiceAccountRequest : TCreateServiceAccountRequest) : TServiceAccount;overload;
- Function Update(_name: string; aServiceAccount : TServiceAccount) : TServiceAccount;
- Function Delete(_name: string) : TEmpty;
- Function SignBlob(_name: string; aSignBlobRequest : TSignBlobRequest) : TSignBlobResponse;
- Function GetIamPolicy(resource: string) : TPolicy;
- Function SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
- Function TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
- Function CreateKeysResource(AOwner : TComponent) : TProjectsServiceAccountsKeysResource;virtual;overload;
- Function CreateKeysResource : TProjectsServiceAccountsKeysResource;virtual;overload;
- Property KeysResource : TProjectsServiceAccountsKeysResource Read GetKeysInstance;
- end;
-
-
- { --------------------------------------------------------------------
- TProjectsResource
- --------------------------------------------------------------------}
-
- TProjectsResource = Class(TGoogleResource)
- Private
- FServiceAccountsKeysInstance : TProjectsServiceAccountsKeysResource;
- FServiceAccountsInstance : TProjectsServiceAccountsResource;
- Function GetServiceAccountsKeysInstance : TProjectsServiceAccountsKeysResource;virtual;
- Function GetServiceAccountsInstance : TProjectsServiceAccountsResource;virtual;
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function CreateServiceAccountsKeysResource(AOwner : TComponent) : TProjectsServiceAccountsKeysResource;virtual;overload;
- Function CreateServiceAccountsKeysResource : TProjectsServiceAccountsKeysResource;virtual;overload;
- Function CreateServiceAccountsResource(AOwner : TComponent) : TProjectsServiceAccountsResource;virtual;overload;
- Function CreateServiceAccountsResource : TProjectsServiceAccountsResource;virtual;overload;
- Property ServiceAccountsKeysResource : TProjectsServiceAccountsKeysResource Read GetServiceAccountsKeysInstance;
- Property ServiceAccountsResource : TProjectsServiceAccountsResource Read GetServiceAccountsInstance;
- end;
-
-
- { --------------------------------------------------------------------
- TIamAPI
- --------------------------------------------------------------------}
-
- TIamAPI = Class(TGoogleAPI)
- Private
- FProjectsServiceAccountsKeysInstance : TProjectsServiceAccountsKeysResource;
- FProjectsServiceAccountsInstance : TProjectsServiceAccountsResource;
- FProjectsInstance : TProjectsResource;
- Function GetProjectsServiceAccountsKeysInstance : TProjectsServiceAccountsKeysResource;virtual;
- Function GetProjectsServiceAccountsInstance : TProjectsServiceAccountsResource;virtual;
- Function GetProjectsInstance : TProjectsResource;virtual;
- Public
- //Override class functions with API info
- Class Function APIName : String; override;
- Class Function APIVersion : String; override;
- Class Function APIRevision : String; override;
- Class Function APIID : String; override;
- Class Function APITitle : String; override;
- Class Function APIDescription : String; override;
- Class Function APIOwnerDomain : String; override;
- Class Function APIOwnerName : String; override;
- Class Function APIIcon16 : String; override;
- Class Function APIIcon32 : String; override;
- Class Function APIdocumentationLink : String; override;
- Class Function APIrootUrl : string; override;
- Class Function APIbasePath : string;override;
- Class Function APIbaseURL : String;override;
- Class Function APIProtocol : string;override;
- Class Function APIservicePath : string;override;
- Class Function APIbatchPath : String;override;
- Class Function APIAuthScopes : TScopeInfoArray;override;
- Class Function APINeedsAuth : Boolean;override;
- Class Procedure RegisterAPIResources; override;
- //Add create function for resources
- Function CreateProjectsServiceAccountsKeysResource(AOwner : TComponent) : TProjectsServiceAccountsKeysResource;virtual;overload;
- Function CreateProjectsServiceAccountsKeysResource : TProjectsServiceAccountsKeysResource;virtual;overload;
- Function CreateProjectsServiceAccountsResource(AOwner : TComponent) : TProjectsServiceAccountsResource;virtual;overload;
- Function CreateProjectsServiceAccountsResource : TProjectsServiceAccountsResource;virtual;overload;
- Function CreateProjectsResource(AOwner : TComponent) : TProjectsResource;virtual;overload;
- Function CreateProjectsResource : TProjectsResource;virtual;overload;
- //Add default on-demand instances for resources
- Property ProjectsServiceAccountsKeysResource : TProjectsServiceAccountsKeysResource Read GetProjectsServiceAccountsKeysInstance;
- Property ProjectsServiceAccountsResource : TProjectsServiceAccountsResource Read GetProjectsServiceAccountsInstance;
- Property ProjectsResource : TProjectsResource Read GetProjectsInstance;
- end;
- implementation
- { --------------------------------------------------------------------
- TListServiceAccountsResponse
- --------------------------------------------------------------------}
- Procedure TListServiceAccountsResponse.Setaccounts(AIndex : Integer; const AValue : TListServiceAccountsResponseTypeaccountsArray);
- begin
- If (Faccounts=AValue) then exit;
- Faccounts:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListServiceAccountsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
- begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TListServiceAccountsResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'accounts' : SetLength(Faccounts,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TServiceAccount
- --------------------------------------------------------------------}
- Procedure TServiceAccount.Setname(AIndex : Integer; const AValue : String);
- begin
- If (Fname=AValue) then exit;
- Fname:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TServiceAccount.SetprojectId(AIndex : Integer; const AValue : String);
- begin
- If (FprojectId=AValue) then exit;
- FprojectId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TServiceAccount.SetuniqueId(AIndex : Integer; const AValue : String);
- begin
- If (FuniqueId=AValue) then exit;
- FuniqueId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TServiceAccount.Setemail(AIndex : Integer; const AValue : String);
- begin
- If (Femail=AValue) then exit;
- Femail:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TServiceAccount.SetdisplayName(AIndex : Integer; const AValue : String);
- begin
- If (FdisplayName=AValue) then exit;
- FdisplayName:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TServiceAccount.Setetag(AIndex : Integer; const AValue : String);
- begin
- If (Fetag=AValue) then exit;
- Fetag:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TServiceAccount.Setoauth2ClientId(AIndex : Integer; const AValue : String);
- begin
- If (Foauth2ClientId=AValue) then exit;
- Foauth2ClientId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TCreateServiceAccountRequest
- --------------------------------------------------------------------}
- Procedure TCreateServiceAccountRequest.SetaccountId(AIndex : Integer; const AValue : String);
- begin
- If (FaccountId=AValue) then exit;
- FaccountId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCreateServiceAccountRequest.SetserviceAccount(AIndex : Integer; const AValue : TServiceAccount);
- begin
- If (FserviceAccount=AValue) then exit;
- FserviceAccount:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TEmpty
- --------------------------------------------------------------------}
- { --------------------------------------------------------------------
- TListServiceAccountKeysResponse
- --------------------------------------------------------------------}
- Procedure TListServiceAccountKeysResponse.Setkeys(AIndex : Integer; const AValue : TListServiceAccountKeysResponseTypekeysArray);
- begin
- If (Fkeys=AValue) then exit;
- Fkeys:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TListServiceAccountKeysResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'keys' : SetLength(Fkeys,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TServiceAccountKey
- --------------------------------------------------------------------}
- Procedure TServiceAccountKey.Setname(AIndex : Integer; const AValue : String);
- begin
- If (Fname=AValue) then exit;
- Fname:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TServiceAccountKey.SetprivateKeyType(AIndex : Integer; const AValue : String);
- begin
- If (FprivateKeyType=AValue) then exit;
- FprivateKeyType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TServiceAccountKey.SetprivateKeyData(AIndex : Integer; const AValue : String);
- begin
- If (FprivateKeyData=AValue) then exit;
- FprivateKeyData:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TServiceAccountKey.SetvalidAfterTime(AIndex : Integer; const AValue : String);
- begin
- If (FvalidAfterTime=AValue) then exit;
- FvalidAfterTime:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TServiceAccountKey.SetvalidBeforeTime(AIndex : Integer; const AValue : String);
- begin
- If (FvalidBeforeTime=AValue) then exit;
- FvalidBeforeTime:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TCreateServiceAccountKeyRequest
- --------------------------------------------------------------------}
- Procedure TCreateServiceAccountKeyRequest.SetprivateKeyType(AIndex : Integer; const AValue : String);
- begin
- If (FprivateKeyType=AValue) then exit;
- FprivateKeyType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TSignBlobRequest
- --------------------------------------------------------------------}
- Procedure TSignBlobRequest.SetbytesToSign(AIndex : Integer; const AValue : String);
- begin
- If (FbytesToSign=AValue) then exit;
- FbytesToSign:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TSignBlobResponse
- --------------------------------------------------------------------}
- Procedure TSignBlobResponse.SetkeyId(AIndex : Integer; const AValue : String);
- begin
- If (FkeyId=AValue) then exit;
- FkeyId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TSignBlobResponse.Setsignature(AIndex : Integer; const AValue : String);
- begin
- If (Fsignature=AValue) then exit;
- Fsignature:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TPolicy
- --------------------------------------------------------------------}
- Procedure TPolicy.Setversion(AIndex : Integer; const AValue : integer);
- begin
- If (Fversion=AValue) then exit;
- Fversion:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TPolicy.Setbindings(AIndex : Integer; const AValue : TPolicyTypebindingsArray);
- begin
- If (Fbindings=AValue) then exit;
- Fbindings:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TPolicy.Setrules(AIndex : Integer; const AValue : TPolicyTyperulesArray);
- begin
- If (Frules=AValue) then exit;
- Frules:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TPolicy.Setetag(AIndex : Integer; const AValue : String);
- begin
- If (Fetag=AValue) then exit;
- Fetag:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TPolicy.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'bindings' : SetLength(Fbindings,ALength);
- 'rules' : SetLength(Frules,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TBinding
- --------------------------------------------------------------------}
- Procedure TBinding.Setrole(AIndex : Integer; const AValue : String);
- begin
- If (Frole=AValue) then exit;
- Frole:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TBinding.Setmembers(AIndex : Integer; const AValue : TStringArray);
- begin
- If (Fmembers=AValue) then exit;
- Fmembers:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TBinding.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'members' : SetLength(Fmembers,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TRule
- --------------------------------------------------------------------}
- Procedure TRule.Setdescription(AIndex : Integer; const AValue : String);
- begin
- If (Fdescription=AValue) then exit;
- Fdescription:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TRule.Setpermissions(AIndex : Integer; const AValue : TStringArray);
- begin
- If (Fpermissions=AValue) then exit;
- Fpermissions:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TRule.Setaction(AIndex : Integer; const AValue : String);
- begin
- If (Faction=AValue) then exit;
- Faction:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TRule.Set_in(AIndex : Integer; const AValue : TStringArray);
- begin
- If (F_in=AValue) then exit;
- F_in:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TRule.SetnotIn(AIndex : Integer; const AValue : TStringArray);
- begin
- If (FnotIn=AValue) then exit;
- FnotIn:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TRule.Setconditions(AIndex : Integer; const AValue : TRuleTypeconditionsArray);
- begin
- If (Fconditions=AValue) then exit;
- Fconditions:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TRule.SetlogConfig(AIndex : Integer; const AValue : TRuleTypelogConfigArray);
- begin
- If (FlogConfig=AValue) then exit;
- FlogConfig:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Class Function TRule.ExportPropertyName(Const AName : String) :String;
- begin
- Case AName of
- '_in' : Result:='in';
- else
- Result:=Inherited ExportPropertyName(AName);
- end;
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TRule.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'permissions' : SetLength(Fpermissions,ALength);
- '_in' : SetLength(F_in,ALength);
- 'notin' : SetLength(FnotIn,ALength);
- 'conditions' : SetLength(Fconditions,ALength);
- 'logconfig' : SetLength(FlogConfig,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TCondition
- --------------------------------------------------------------------}
- Procedure TCondition.Setiam(AIndex : Integer; const AValue : String);
- begin
- If (Fiam=AValue) then exit;
- Fiam:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCondition.Setsys(AIndex : Integer; const AValue : String);
- begin
- If (Fsys=AValue) then exit;
- Fsys:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCondition.Setsvc(AIndex : Integer; const AValue : String);
- begin
- If (Fsvc=AValue) then exit;
- Fsvc:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCondition.Setop(AIndex : Integer; const AValue : String);
- begin
- If (Fop=AValue) then exit;
- Fop:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCondition.Setvalue(AIndex : Integer; const AValue : String);
- begin
- If (Fvalue=AValue) then exit;
- Fvalue:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCondition.Setvalues(AIndex : Integer; const AValue : TStringArray);
- begin
- If (Fvalues=AValue) then exit;
- Fvalues:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TCondition.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'values' : SetLength(Fvalues,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TLogConfig
- --------------------------------------------------------------------}
- Procedure TLogConfig.Setcounter(AIndex : Integer; const AValue : TCounterOptions);
- begin
- If (Fcounter=AValue) then exit;
- Fcounter:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLogConfig.SetdataAccess(AIndex : Integer; const AValue : TDataAccessOptions);
- begin
- If (FdataAccess=AValue) then exit;
- FdataAccess:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLogConfig.SetcloudAudit(AIndex : Integer; const AValue : TCloudAuditOptions);
- begin
- If (FcloudAudit=AValue) then exit;
- FcloudAudit:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TCounterOptions
- --------------------------------------------------------------------}
- Procedure TCounterOptions.Setmetric(AIndex : Integer; const AValue : String);
- begin
- If (Fmetric=AValue) then exit;
- Fmetric:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCounterOptions.Setfield(AIndex : Integer; const AValue : String);
- begin
- If (Ffield=AValue) then exit;
- Ffield:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TDataAccessOptions
- --------------------------------------------------------------------}
- { --------------------------------------------------------------------
- TCloudAuditOptions
- --------------------------------------------------------------------}
- { --------------------------------------------------------------------
- TSetIamPolicyRequest
- --------------------------------------------------------------------}
- Procedure TSetIamPolicyRequest.Setpolicy(AIndex : Integer; const AValue : TPolicy);
- begin
- If (Fpolicy=AValue) then exit;
- Fpolicy:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TTestIamPermissionsRequest
- --------------------------------------------------------------------}
- Procedure TTestIamPermissionsRequest.Setpermissions(AIndex : Integer; const AValue : TStringArray);
- begin
- If (Fpermissions=AValue) then exit;
- Fpermissions:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TTestIamPermissionsRequest.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'permissions' : SetLength(Fpermissions,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TTestIamPermissionsResponse
- --------------------------------------------------------------------}
- Procedure TTestIamPermissionsResponse.Setpermissions(AIndex : Integer; const AValue : TStringArray);
- begin
- If (Fpermissions=AValue) then exit;
- Fpermissions:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TTestIamPermissionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'permissions' : SetLength(Fpermissions,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TProjectsServiceAccountsKeysResource
- --------------------------------------------------------------------}
- Class Function TProjectsServiceAccountsKeysResource.ResourceName : String;
- begin
- Result:='keys';
- end;
- Class Function TProjectsServiceAccountsKeysResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TiamAPI;
- end;
- Function TProjectsServiceAccountsKeysResource.List(_name: string; AQuery : string = '') : TListServiceAccountKeysResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'v1/{+name}/keys';
- _Methodid = 'iam.projects.serviceAccounts.keys.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListServiceAccountKeysResponse) as TListServiceAccountKeysResponse;
- end;
- Function TProjectsServiceAccountsKeysResource.List(_name: string; AQuery : TProjectsServiceAccountsKeyslistOptions) : TListServiceAccountKeysResponse;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'keyTypes',AQuery.keyTypes);
- Result:=List(_name,_Q);
- end;
- Function TProjectsServiceAccountsKeysResource.Get(_name: string) : TServiceAccountKey;
- Const
- _HTTPMethod = 'GET';
- _Path = 'v1/{+name}';
- _Methodid = 'iam.projects.serviceAccounts.keys.get';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TServiceAccountKey) as TServiceAccountKey;
- end;
- Function TProjectsServiceAccountsKeysResource.Create(_name: string; aCreateServiceAccountKeyRequest : TCreateServiceAccountKeyRequest) : TServiceAccountKey;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+name}/keys';
- _Methodid = 'iam.projects.serviceAccounts.keys.create';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aCreateServiceAccountKeyRequest,TServiceAccountKey) as TServiceAccountKey;
- end;
- Function TProjectsServiceAccountsKeysResource.Delete(_name: string) : TEmpty;
- Const
- _HTTPMethod = 'DELETE';
- _Path = 'v1/{+name}';
- _Methodid = 'iam.projects.serviceAccounts.keys.delete';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
- end;
- { --------------------------------------------------------------------
- TProjectsServiceAccountsResource
- --------------------------------------------------------------------}
- Class Function TProjectsServiceAccountsResource.ResourceName : String;
- begin
- Result:='serviceAccounts';
- end;
- Class Function TProjectsServiceAccountsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TiamAPI;
- end;
- Function TProjectsServiceAccountsResource.List(_name: string; AQuery : string = '') : TListServiceAccountsResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'v1/{+name}/serviceAccounts';
- _Methodid = 'iam.projects.serviceAccounts.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListServiceAccountsResponse) as TListServiceAccountsResponse;
- end;
- Function TProjectsServiceAccountsResource.List(_name: string; AQuery : TProjectsServiceAccountslistOptions) : TListServiceAccountsResponse;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'pageSize',AQuery.pageSize);
- AddToQuery(_Q,'pageToken',AQuery.pageToken);
- Result:=List(_name,_Q);
- end;
- Function TProjectsServiceAccountsResource.Get(_name: string) : TServiceAccount;
- Const
- _HTTPMethod = 'GET';
- _Path = 'v1/{+name}';
- _Methodid = 'iam.projects.serviceAccounts.get';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TServiceAccount) as TServiceAccount;
- end;
- Function TProjectsServiceAccountsResource.Create(_name: string; aCreateServiceAccountRequest : TCreateServiceAccountRequest) : TServiceAccount;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+name}/serviceAccounts';
- _Methodid = 'iam.projects.serviceAccounts.create';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aCreateServiceAccountRequest,TServiceAccount) as TServiceAccount;
- end;
- Function TProjectsServiceAccountsResource.Update(_name: string; aServiceAccount : TServiceAccount) : TServiceAccount;
- Const
- _HTTPMethod = 'PUT';
- _Path = 'v1/{+name}';
- _Methodid = 'iam.projects.serviceAccounts.update';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aServiceAccount,TServiceAccount) as TServiceAccount;
- end;
- Function TProjectsServiceAccountsResource.Delete(_name: string) : TEmpty;
- Const
- _HTTPMethod = 'DELETE';
- _Path = 'v1/{+name}';
- _Methodid = 'iam.projects.serviceAccounts.delete';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
- end;
- Function TProjectsServiceAccountsResource.SignBlob(_name: string; aSignBlobRequest : TSignBlobRequest) : TSignBlobResponse;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+name}:signBlob';
- _Methodid = 'iam.projects.serviceAccounts.signBlob';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aSignBlobRequest,TSignBlobResponse) as TSignBlobResponse;
- end;
- Function TProjectsServiceAccountsResource.GetIamPolicy(resource: string) : TPolicy;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+resource}:getIamPolicy';
- _Methodid = 'iam.projects.serviceAccounts.getIamPolicy';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['resource',resource]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TPolicy) as TPolicy;
- end;
- Function TProjectsServiceAccountsResource.SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+resource}:setIamPolicy';
- _Methodid = 'iam.projects.serviceAccounts.setIamPolicy';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['resource',resource]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aSetIamPolicyRequest,TPolicy) as TPolicy;
- end;
- Function TProjectsServiceAccountsResource.TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+resource}:testIamPermissions';
- _Methodid = 'iam.projects.serviceAccounts.testIamPermissions';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['resource',resource]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aTestIamPermissionsRequest,TTestIamPermissionsResponse) as TTestIamPermissionsResponse;
- end;
- Function TProjectsServiceAccountsResource.GetKeysInstance : TProjectsServiceAccountsKeysResource;
- begin
- if (FKeysInstance=Nil) then
- FKeysInstance:=CreateKeysResource;
- Result:=FKeysInstance;
- end;
- Function TProjectsServiceAccountsResource.CreateKeysResource : TProjectsServiceAccountsKeysResource;
- begin
- Result:=CreateKeysResource(Self);
- end;
- Function TProjectsServiceAccountsResource.CreateKeysResource(AOwner : TComponent) : TProjectsServiceAccountsKeysResource;
- begin
- Result:=TProjectsServiceAccountsKeysResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- { --------------------------------------------------------------------
- TProjectsResource
- --------------------------------------------------------------------}
- Class Function TProjectsResource.ResourceName : String;
- begin
- Result:='projects';
- end;
- Class Function TProjectsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TiamAPI;
- end;
- Function TProjectsResource.GetServiceAccountsKeysInstance : TProjectsServiceAccountsKeysResource;
- begin
- if (FServiceAccountsKeysInstance=Nil) then
- FServiceAccountsKeysInstance:=CreateServiceAccountsKeysResource;
- Result:=FServiceAccountsKeysInstance;
- end;
- Function TProjectsResource.CreateServiceAccountsKeysResource : TProjectsServiceAccountsKeysResource;
- begin
- Result:=CreateServiceAccountsKeysResource(Self);
- end;
- Function TProjectsResource.CreateServiceAccountsKeysResource(AOwner : TComponent) : TProjectsServiceAccountsKeysResource;
- begin
- Result:=TProjectsServiceAccountsKeysResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TProjectsResource.GetServiceAccountsInstance : TProjectsServiceAccountsResource;
- begin
- if (FServiceAccountsInstance=Nil) then
- FServiceAccountsInstance:=CreateServiceAccountsResource;
- Result:=FServiceAccountsInstance;
- end;
- Function TProjectsResource.CreateServiceAccountsResource : TProjectsServiceAccountsResource;
- begin
- Result:=CreateServiceAccountsResource(Self);
- end;
- Function TProjectsResource.CreateServiceAccountsResource(AOwner : TComponent) : TProjectsServiceAccountsResource;
- begin
- Result:=TProjectsServiceAccountsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- { --------------------------------------------------------------------
- TIamAPI
- --------------------------------------------------------------------}
- Class Function TIamAPI.APIName : String;
- begin
- Result:='iam';
- end;
- Class Function TIamAPI.APIVersion : String;
- begin
- Result:='v1';
- end;
- Class Function TIamAPI.APIRevision : String;
- begin
- Result:='20160129';
- end;
- Class Function TIamAPI.APIID : String;
- begin
- Result:='iam:v1';
- end;
- Class Function TIamAPI.APITitle : String;
- begin
- Result:='Google Identity and Access Management API';
- end;
- Class Function TIamAPI.APIDescription : String;
- begin
- Result:='Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls.';
- end;
- Class Function TIamAPI.APIOwnerDomain : String;
- begin
- Result:='google.com';
- end;
- Class Function TIamAPI.APIOwnerName : String;
- begin
- Result:='Google';
- end;
- Class Function TIamAPI.APIIcon16 : String;
- begin
- Result:='http://www.google.com/images/icons/product/search-16.gif';
- end;
- Class Function TIamAPI.APIIcon32 : String;
- begin
- Result:='http://www.google.com/images/icons/product/search-32.gif';
- end;
- Class Function TIamAPI.APIdocumentationLink : String;
- begin
- Result:='https://cloud.google.com/iam/';
- end;
- Class Function TIamAPI.APIrootUrl : string;
- begin
- Result:='https://iam.googleapis.com/';
- end;
- Class Function TIamAPI.APIbasePath : string;
- begin
- Result:='';
- end;
- Class Function TIamAPI.APIbaseURL : String;
- begin
- Result:='https://iam.googleapis.com/';
- end;
- Class Function TIamAPI.APIProtocol : string;
- begin
- Result:='rest';
- end;
- Class Function TIamAPI.APIservicePath : string;
- begin
- Result:='';
- end;
- Class Function TIamAPI.APIbatchPath : String;
- begin
- Result:='batch';
- end;
- Class Function TIamAPI.APIAuthScopes : TScopeInfoArray;
- begin
- SetLength(Result,1);
- Result[0].Name:='https://www.googleapis.com/auth/cloud-platform';
- Result[0].Description:='View and manage your data across Google Cloud Platform services';
-
- end;
- Class Function TIamAPI.APINeedsAuth : Boolean;
- begin
- Result:=True;
- end;
- Class Procedure TIamAPI.RegisterAPIResources;
- begin
- TListServiceAccountsResponse.RegisterObject;
- TServiceAccount.RegisterObject;
- TCreateServiceAccountRequest.RegisterObject;
- TEmpty.RegisterObject;
- TListServiceAccountKeysResponse.RegisterObject;
- TServiceAccountKey.RegisterObject;
- TCreateServiceAccountKeyRequest.RegisterObject;
- TSignBlobRequest.RegisterObject;
- TSignBlobResponse.RegisterObject;
- TPolicy.RegisterObject;
- TBinding.RegisterObject;
- TRule.RegisterObject;
- TCondition.RegisterObject;
- TLogConfig.RegisterObject;
- TCounterOptions.RegisterObject;
- TDataAccessOptions.RegisterObject;
- TCloudAuditOptions.RegisterObject;
- TSetIamPolicyRequest.RegisterObject;
- TTestIamPermissionsRequest.RegisterObject;
- TTestIamPermissionsResponse.RegisterObject;
- end;
- Function TIamAPI.GetProjectsServiceAccountsKeysInstance : TProjectsServiceAccountsKeysResource;
- begin
- if (FProjectsServiceAccountsKeysInstance=Nil) then
- FProjectsServiceAccountsKeysInstance:=CreateProjectsServiceAccountsKeysResource;
- Result:=FProjectsServiceAccountsKeysInstance;
- end;
- Function TIamAPI.CreateProjectsServiceAccountsKeysResource : TProjectsServiceAccountsKeysResource;
- begin
- Result:=CreateProjectsServiceAccountsKeysResource(Self);
- end;
- Function TIamAPI.CreateProjectsServiceAccountsKeysResource(AOwner : TComponent) : TProjectsServiceAccountsKeysResource;
- begin
- Result:=TProjectsServiceAccountsKeysResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TIamAPI.GetProjectsServiceAccountsInstance : TProjectsServiceAccountsResource;
- begin
- if (FProjectsServiceAccountsInstance=Nil) then
- FProjectsServiceAccountsInstance:=CreateProjectsServiceAccountsResource;
- Result:=FProjectsServiceAccountsInstance;
- end;
- Function TIamAPI.CreateProjectsServiceAccountsResource : TProjectsServiceAccountsResource;
- begin
- Result:=CreateProjectsServiceAccountsResource(Self);
- end;
- Function TIamAPI.CreateProjectsServiceAccountsResource(AOwner : TComponent) : TProjectsServiceAccountsResource;
- begin
- Result:=TProjectsServiceAccountsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TIamAPI.GetProjectsInstance : TProjectsResource;
- begin
- if (FProjectsInstance=Nil) then
- FProjectsInstance:=CreateProjectsResource;
- Result:=FProjectsInstance;
- end;
- Function TIamAPI.CreateProjectsResource : TProjectsResource;
- begin
- Result:=CreateProjectsResource(Self);
- end;
- Function TIamAPI.CreateProjectsResource(AOwner : TComponent) : TProjectsResource;
- begin
- Result:=TProjectsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- initialization
- TIamAPI.RegisterAPI;
- end.
|