You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

738 lines
30 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/cloud/asset/v1/asset_service.proto
  3. package asset // import "google.golang.org/genproto/googleapis/cloud/asset/v1"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import timestamp "github.com/golang/protobuf/ptypes/timestamp"
  8. import _ "google.golang.org/genproto/googleapis/api/annotations"
  9. import longrunning "google.golang.org/genproto/googleapis/longrunning"
  10. import (
  11. context "golang.org/x/net/context"
  12. grpc "google.golang.org/grpc"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. // This is a compile-time assertion to ensure that this generated file
  19. // is compatible with the proto package it is being compiled against.
  20. // A compilation error at this line likely means your copy of the
  21. // proto package needs to be updated.
  22. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  23. // Asset content type.
  24. type ContentType int32
  25. const (
  26. // Unspecified content type.
  27. ContentType_CONTENT_TYPE_UNSPECIFIED ContentType = 0
  28. // Resource metadata.
  29. ContentType_RESOURCE ContentType = 1
  30. // The actual IAM policy set on a resource.
  31. ContentType_IAM_POLICY ContentType = 2
  32. )
  33. var ContentType_name = map[int32]string{
  34. 0: "CONTENT_TYPE_UNSPECIFIED",
  35. 1: "RESOURCE",
  36. 2: "IAM_POLICY",
  37. }
  38. var ContentType_value = map[string]int32{
  39. "CONTENT_TYPE_UNSPECIFIED": 0,
  40. "RESOURCE": 1,
  41. "IAM_POLICY": 2,
  42. }
  43. func (x ContentType) String() string {
  44. return proto.EnumName(ContentType_name, int32(x))
  45. }
  46. func (ContentType) EnumDescriptor() ([]byte, []int) {
  47. return fileDescriptor_asset_service_fdd5d93f8b149ada, []int{0}
  48. }
  49. // Export asset request.
  50. type ExportAssetsRequest struct {
  51. // Required. The relative name of the root asset. This can only be an
  52. // organization number (such as "organizations/123"), a project ID (such as
  53. // "projects/my-project-id"), or a project number (such as "projects/12345"),
  54. // or a folder number (such as "folders/123").
  55. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
  56. // Timestamp to take an asset snapshot. This can only be set to a timestamp
  57. // between 2018-10-02 UTC (inclusive) and the current time. If not specified,
  58. // the current time will be used. Due to delays in resource data collection
  59. // and indexing, there is a volatile window during which running the same
  60. // query may get different results.
  61. ReadTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
  62. // A list of asset types of which to take a snapshot for. For example:
  63. // "google.compute.disk". If specified, only matching assets will be returned.
  64. // See [Introduction to Cloud Asset
  65. // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
  66. // for all supported asset types.
  67. AssetTypes []string `protobuf:"bytes,3,rep,name=asset_types,json=assetTypes,proto3" json:"asset_types,omitempty"`
  68. // Asset content type. If not specified, no content but the asset name will be
  69. // returned.
  70. ContentType ContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=google.cloud.asset.v1.ContentType" json:"content_type,omitempty"`
  71. // Required. Output configuration indicating where the results will be output
  72. // to. All results will be in newline delimited JSON format.
  73. OutputConfig *OutputConfig `protobuf:"bytes,5,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
  74. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  75. XXX_unrecognized []byte `json:"-"`
  76. XXX_sizecache int32 `json:"-"`
  77. }
  78. func (m *ExportAssetsRequest) Reset() { *m = ExportAssetsRequest{} }
  79. func (m *ExportAssetsRequest) String() string { return proto.CompactTextString(m) }
  80. func (*ExportAssetsRequest) ProtoMessage() {}
  81. func (*ExportAssetsRequest) Descriptor() ([]byte, []int) {
  82. return fileDescriptor_asset_service_fdd5d93f8b149ada, []int{0}
  83. }
  84. func (m *ExportAssetsRequest) XXX_Unmarshal(b []byte) error {
  85. return xxx_messageInfo_ExportAssetsRequest.Unmarshal(m, b)
  86. }
  87. func (m *ExportAssetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  88. return xxx_messageInfo_ExportAssetsRequest.Marshal(b, m, deterministic)
  89. }
  90. func (dst *ExportAssetsRequest) XXX_Merge(src proto.Message) {
  91. xxx_messageInfo_ExportAssetsRequest.Merge(dst, src)
  92. }
  93. func (m *ExportAssetsRequest) XXX_Size() int {
  94. return xxx_messageInfo_ExportAssetsRequest.Size(m)
  95. }
  96. func (m *ExportAssetsRequest) XXX_DiscardUnknown() {
  97. xxx_messageInfo_ExportAssetsRequest.DiscardUnknown(m)
  98. }
  99. var xxx_messageInfo_ExportAssetsRequest proto.InternalMessageInfo
  100. func (m *ExportAssetsRequest) GetParent() string {
  101. if m != nil {
  102. return m.Parent
  103. }
  104. return ""
  105. }
  106. func (m *ExportAssetsRequest) GetReadTime() *timestamp.Timestamp {
  107. if m != nil {
  108. return m.ReadTime
  109. }
  110. return nil
  111. }
  112. func (m *ExportAssetsRequest) GetAssetTypes() []string {
  113. if m != nil {
  114. return m.AssetTypes
  115. }
  116. return nil
  117. }
  118. func (m *ExportAssetsRequest) GetContentType() ContentType {
  119. if m != nil {
  120. return m.ContentType
  121. }
  122. return ContentType_CONTENT_TYPE_UNSPECIFIED
  123. }
  124. func (m *ExportAssetsRequest) GetOutputConfig() *OutputConfig {
  125. if m != nil {
  126. return m.OutputConfig
  127. }
  128. return nil
  129. }
  130. // The export asset response. This message is returned by the
  131. // [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned
  132. // [google.longrunning.Operation.response][google.longrunning.Operation.response] field.
  133. type ExportAssetsResponse struct {
  134. // Time the snapshot was taken.
  135. ReadTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
  136. // Output configuration indicating where the results were output to.
  137. // All results are in JSON format.
  138. OutputConfig *OutputConfig `protobuf:"bytes,2,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
  139. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  140. XXX_unrecognized []byte `json:"-"`
  141. XXX_sizecache int32 `json:"-"`
  142. }
  143. func (m *ExportAssetsResponse) Reset() { *m = ExportAssetsResponse{} }
  144. func (m *ExportAssetsResponse) String() string { return proto.CompactTextString(m) }
  145. func (*ExportAssetsResponse) ProtoMessage() {}
  146. func (*ExportAssetsResponse) Descriptor() ([]byte, []int) {
  147. return fileDescriptor_asset_service_fdd5d93f8b149ada, []int{1}
  148. }
  149. func (m *ExportAssetsResponse) XXX_Unmarshal(b []byte) error {
  150. return xxx_messageInfo_ExportAssetsResponse.Unmarshal(m, b)
  151. }
  152. func (m *ExportAssetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  153. return xxx_messageInfo_ExportAssetsResponse.Marshal(b, m, deterministic)
  154. }
  155. func (dst *ExportAssetsResponse) XXX_Merge(src proto.Message) {
  156. xxx_messageInfo_ExportAssetsResponse.Merge(dst, src)
  157. }
  158. func (m *ExportAssetsResponse) XXX_Size() int {
  159. return xxx_messageInfo_ExportAssetsResponse.Size(m)
  160. }
  161. func (m *ExportAssetsResponse) XXX_DiscardUnknown() {
  162. xxx_messageInfo_ExportAssetsResponse.DiscardUnknown(m)
  163. }
  164. var xxx_messageInfo_ExportAssetsResponse proto.InternalMessageInfo
  165. func (m *ExportAssetsResponse) GetReadTime() *timestamp.Timestamp {
  166. if m != nil {
  167. return m.ReadTime
  168. }
  169. return nil
  170. }
  171. func (m *ExportAssetsResponse) GetOutputConfig() *OutputConfig {
  172. if m != nil {
  173. return m.OutputConfig
  174. }
  175. return nil
  176. }
  177. // Batch get assets history request.
  178. type BatchGetAssetsHistoryRequest struct {
  179. // Required. The relative name of the root asset. It can only be an
  180. // organization number (such as "organizations/123"), a project ID (such as
  181. // "projects/my-project-id")", or a project number (such as "projects/12345").
  182. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
  183. // A list of the full names of the assets. For example:
  184. // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
  185. // See [Resource
  186. // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
  187. // for more info.
  188. //
  189. // The request becomes a no-op if the asset name list is empty, and the max
  190. // size of the asset name list is 100 in one request.
  191. AssetNames []string `protobuf:"bytes,2,rep,name=asset_names,json=assetNames,proto3" json:"asset_names,omitempty"`
  192. // Required. The content type.
  193. ContentType ContentType `protobuf:"varint,3,opt,name=content_type,json=contentType,proto3,enum=google.cloud.asset.v1.ContentType" json:"content_type,omitempty"`
  194. // Optional. The time window for the asset history. Both start_time and
  195. // end_time are optional and if set, it must be after 2018-10-02 UTC. If
  196. // end_time is not set, it is default to current timestamp. If start_time is
  197. // not set, the snapshot of the assets at end_time will be returned. The
  198. // returned results contain all temporal assets whose time window overlap with
  199. // read_time_window.
  200. ReadTimeWindow *TimeWindow `protobuf:"bytes,4,opt,name=read_time_window,json=readTimeWindow,proto3" json:"read_time_window,omitempty"`
  201. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  202. XXX_unrecognized []byte `json:"-"`
  203. XXX_sizecache int32 `json:"-"`
  204. }
  205. func (m *BatchGetAssetsHistoryRequest) Reset() { *m = BatchGetAssetsHistoryRequest{} }
  206. func (m *BatchGetAssetsHistoryRequest) String() string { return proto.CompactTextString(m) }
  207. func (*BatchGetAssetsHistoryRequest) ProtoMessage() {}
  208. func (*BatchGetAssetsHistoryRequest) Descriptor() ([]byte, []int) {
  209. return fileDescriptor_asset_service_fdd5d93f8b149ada, []int{2}
  210. }
  211. func (m *BatchGetAssetsHistoryRequest) XXX_Unmarshal(b []byte) error {
  212. return xxx_messageInfo_BatchGetAssetsHistoryRequest.Unmarshal(m, b)
  213. }
  214. func (m *BatchGetAssetsHistoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  215. return xxx_messageInfo_BatchGetAssetsHistoryRequest.Marshal(b, m, deterministic)
  216. }
  217. func (dst *BatchGetAssetsHistoryRequest) XXX_Merge(src proto.Message) {
  218. xxx_messageInfo_BatchGetAssetsHistoryRequest.Merge(dst, src)
  219. }
  220. func (m *BatchGetAssetsHistoryRequest) XXX_Size() int {
  221. return xxx_messageInfo_BatchGetAssetsHistoryRequest.Size(m)
  222. }
  223. func (m *BatchGetAssetsHistoryRequest) XXX_DiscardUnknown() {
  224. xxx_messageInfo_BatchGetAssetsHistoryRequest.DiscardUnknown(m)
  225. }
  226. var xxx_messageInfo_BatchGetAssetsHistoryRequest proto.InternalMessageInfo
  227. func (m *BatchGetAssetsHistoryRequest) GetParent() string {
  228. if m != nil {
  229. return m.Parent
  230. }
  231. return ""
  232. }
  233. func (m *BatchGetAssetsHistoryRequest) GetAssetNames() []string {
  234. if m != nil {
  235. return m.AssetNames
  236. }
  237. return nil
  238. }
  239. func (m *BatchGetAssetsHistoryRequest) GetContentType() ContentType {
  240. if m != nil {
  241. return m.ContentType
  242. }
  243. return ContentType_CONTENT_TYPE_UNSPECIFIED
  244. }
  245. func (m *BatchGetAssetsHistoryRequest) GetReadTimeWindow() *TimeWindow {
  246. if m != nil {
  247. return m.ReadTimeWindow
  248. }
  249. return nil
  250. }
  251. // Batch get assets history response.
  252. type BatchGetAssetsHistoryResponse struct {
  253. // A list of assets with valid time windows.
  254. Assets []*TemporalAsset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"`
  255. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  256. XXX_unrecognized []byte `json:"-"`
  257. XXX_sizecache int32 `json:"-"`
  258. }
  259. func (m *BatchGetAssetsHistoryResponse) Reset() { *m = BatchGetAssetsHistoryResponse{} }
  260. func (m *BatchGetAssetsHistoryResponse) String() string { return proto.CompactTextString(m) }
  261. func (*BatchGetAssetsHistoryResponse) ProtoMessage() {}
  262. func (*BatchGetAssetsHistoryResponse) Descriptor() ([]byte, []int) {
  263. return fileDescriptor_asset_service_fdd5d93f8b149ada, []int{3}
  264. }
  265. func (m *BatchGetAssetsHistoryResponse) XXX_Unmarshal(b []byte) error {
  266. return xxx_messageInfo_BatchGetAssetsHistoryResponse.Unmarshal(m, b)
  267. }
  268. func (m *BatchGetAssetsHistoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  269. return xxx_messageInfo_BatchGetAssetsHistoryResponse.Marshal(b, m, deterministic)
  270. }
  271. func (dst *BatchGetAssetsHistoryResponse) XXX_Merge(src proto.Message) {
  272. xxx_messageInfo_BatchGetAssetsHistoryResponse.Merge(dst, src)
  273. }
  274. func (m *BatchGetAssetsHistoryResponse) XXX_Size() int {
  275. return xxx_messageInfo_BatchGetAssetsHistoryResponse.Size(m)
  276. }
  277. func (m *BatchGetAssetsHistoryResponse) XXX_DiscardUnknown() {
  278. xxx_messageInfo_BatchGetAssetsHistoryResponse.DiscardUnknown(m)
  279. }
  280. var xxx_messageInfo_BatchGetAssetsHistoryResponse proto.InternalMessageInfo
  281. func (m *BatchGetAssetsHistoryResponse) GetAssets() []*TemporalAsset {
  282. if m != nil {
  283. return m.Assets
  284. }
  285. return nil
  286. }
  287. // Output configuration for export assets destination.
  288. type OutputConfig struct {
  289. // Asset export destination.
  290. //
  291. // Types that are valid to be assigned to Destination:
  292. // *OutputConfig_GcsDestination
  293. Destination isOutputConfig_Destination `protobuf_oneof:"destination"`
  294. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  295. XXX_unrecognized []byte `json:"-"`
  296. XXX_sizecache int32 `json:"-"`
  297. }
  298. func (m *OutputConfig) Reset() { *m = OutputConfig{} }
  299. func (m *OutputConfig) String() string { return proto.CompactTextString(m) }
  300. func (*OutputConfig) ProtoMessage() {}
  301. func (*OutputConfig) Descriptor() ([]byte, []int) {
  302. return fileDescriptor_asset_service_fdd5d93f8b149ada, []int{4}
  303. }
  304. func (m *OutputConfig) XXX_Unmarshal(b []byte) error {
  305. return xxx_messageInfo_OutputConfig.Unmarshal(m, b)
  306. }
  307. func (m *OutputConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  308. return xxx_messageInfo_OutputConfig.Marshal(b, m, deterministic)
  309. }
  310. func (dst *OutputConfig) XXX_Merge(src proto.Message) {
  311. xxx_messageInfo_OutputConfig.Merge(dst, src)
  312. }
  313. func (m *OutputConfig) XXX_Size() int {
  314. return xxx_messageInfo_OutputConfig.Size(m)
  315. }
  316. func (m *OutputConfig) XXX_DiscardUnknown() {
  317. xxx_messageInfo_OutputConfig.DiscardUnknown(m)
  318. }
  319. var xxx_messageInfo_OutputConfig proto.InternalMessageInfo
  320. type isOutputConfig_Destination interface {
  321. isOutputConfig_Destination()
  322. }
  323. type OutputConfig_GcsDestination struct {
  324. GcsDestination *GcsDestination `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3,oneof"`
  325. }
  326. func (*OutputConfig_GcsDestination) isOutputConfig_Destination() {}
  327. func (m *OutputConfig) GetDestination() isOutputConfig_Destination {
  328. if m != nil {
  329. return m.Destination
  330. }
  331. return nil
  332. }
  333. func (m *OutputConfig) GetGcsDestination() *GcsDestination {
  334. if x, ok := m.GetDestination().(*OutputConfig_GcsDestination); ok {
  335. return x.GcsDestination
  336. }
  337. return nil
  338. }
  339. // XXX_OneofFuncs is for the internal use of the proto package.
  340. func (*OutputConfig) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  341. return _OutputConfig_OneofMarshaler, _OutputConfig_OneofUnmarshaler, _OutputConfig_OneofSizer, []interface{}{
  342. (*OutputConfig_GcsDestination)(nil),
  343. }
  344. }
  345. func _OutputConfig_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  346. m := msg.(*OutputConfig)
  347. // destination
  348. switch x := m.Destination.(type) {
  349. case *OutputConfig_GcsDestination:
  350. b.EncodeVarint(1<<3 | proto.WireBytes)
  351. if err := b.EncodeMessage(x.GcsDestination); err != nil {
  352. return err
  353. }
  354. case nil:
  355. default:
  356. return fmt.Errorf("OutputConfig.Destination has unexpected type %T", x)
  357. }
  358. return nil
  359. }
  360. func _OutputConfig_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  361. m := msg.(*OutputConfig)
  362. switch tag {
  363. case 1: // destination.gcs_destination
  364. if wire != proto.WireBytes {
  365. return true, proto.ErrInternalBadWireType
  366. }
  367. msg := new(GcsDestination)
  368. err := b.DecodeMessage(msg)
  369. m.Destination = &OutputConfig_GcsDestination{msg}
  370. return true, err
  371. default:
  372. return false, nil
  373. }
  374. }
  375. func _OutputConfig_OneofSizer(msg proto.Message) (n int) {
  376. m := msg.(*OutputConfig)
  377. // destination
  378. switch x := m.Destination.(type) {
  379. case *OutputConfig_GcsDestination:
  380. s := proto.Size(x.GcsDestination)
  381. n += 1 // tag and wire
  382. n += proto.SizeVarint(uint64(s))
  383. n += s
  384. case nil:
  385. default:
  386. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  387. }
  388. return n
  389. }
  390. // A Cloud Storage location.
  391. type GcsDestination struct {
  392. // Required.
  393. //
  394. // Types that are valid to be assigned to ObjectUri:
  395. // *GcsDestination_Uri
  396. ObjectUri isGcsDestination_ObjectUri `protobuf_oneof:"object_uri"`
  397. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  398. XXX_unrecognized []byte `json:"-"`
  399. XXX_sizecache int32 `json:"-"`
  400. }
  401. func (m *GcsDestination) Reset() { *m = GcsDestination{} }
  402. func (m *GcsDestination) String() string { return proto.CompactTextString(m) }
  403. func (*GcsDestination) ProtoMessage() {}
  404. func (*GcsDestination) Descriptor() ([]byte, []int) {
  405. return fileDescriptor_asset_service_fdd5d93f8b149ada, []int{5}
  406. }
  407. func (m *GcsDestination) XXX_Unmarshal(b []byte) error {
  408. return xxx_messageInfo_GcsDestination.Unmarshal(m, b)
  409. }
  410. func (m *GcsDestination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  411. return xxx_messageInfo_GcsDestination.Marshal(b, m, deterministic)
  412. }
  413. func (dst *GcsDestination) XXX_Merge(src proto.Message) {
  414. xxx_messageInfo_GcsDestination.Merge(dst, src)
  415. }
  416. func (m *GcsDestination) XXX_Size() int {
  417. return xxx_messageInfo_GcsDestination.Size(m)
  418. }
  419. func (m *GcsDestination) XXX_DiscardUnknown() {
  420. xxx_messageInfo_GcsDestination.DiscardUnknown(m)
  421. }
  422. var xxx_messageInfo_GcsDestination proto.InternalMessageInfo
  423. type isGcsDestination_ObjectUri interface {
  424. isGcsDestination_ObjectUri()
  425. }
  426. type GcsDestination_Uri struct {
  427. Uri string `protobuf:"bytes,1,opt,name=uri,proto3,oneof"`
  428. }
  429. func (*GcsDestination_Uri) isGcsDestination_ObjectUri() {}
  430. func (m *GcsDestination) GetObjectUri() isGcsDestination_ObjectUri {
  431. if m != nil {
  432. return m.ObjectUri
  433. }
  434. return nil
  435. }
  436. func (m *GcsDestination) GetUri() string {
  437. if x, ok := m.GetObjectUri().(*GcsDestination_Uri); ok {
  438. return x.Uri
  439. }
  440. return ""
  441. }
  442. // XXX_OneofFuncs is for the internal use of the proto package.
  443. func (*GcsDestination) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  444. return _GcsDestination_OneofMarshaler, _GcsDestination_OneofUnmarshaler, _GcsDestination_OneofSizer, []interface{}{
  445. (*GcsDestination_Uri)(nil),
  446. }
  447. }
  448. func _GcsDestination_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  449. m := msg.(*GcsDestination)
  450. // object_uri
  451. switch x := m.ObjectUri.(type) {
  452. case *GcsDestination_Uri:
  453. b.EncodeVarint(1<<3 | proto.WireBytes)
  454. b.EncodeStringBytes(x.Uri)
  455. case nil:
  456. default:
  457. return fmt.Errorf("GcsDestination.ObjectUri has unexpected type %T", x)
  458. }
  459. return nil
  460. }
  461. func _GcsDestination_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  462. m := msg.(*GcsDestination)
  463. switch tag {
  464. case 1: // object_uri.uri
  465. if wire != proto.WireBytes {
  466. return true, proto.ErrInternalBadWireType
  467. }
  468. x, err := b.DecodeStringBytes()
  469. m.ObjectUri = &GcsDestination_Uri{x}
  470. return true, err
  471. default:
  472. return false, nil
  473. }
  474. }
  475. func _GcsDestination_OneofSizer(msg proto.Message) (n int) {
  476. m := msg.(*GcsDestination)
  477. // object_uri
  478. switch x := m.ObjectUri.(type) {
  479. case *GcsDestination_Uri:
  480. n += 1 // tag and wire
  481. n += proto.SizeVarint(uint64(len(x.Uri)))
  482. n += len(x.Uri)
  483. case nil:
  484. default:
  485. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  486. }
  487. return n
  488. }
  489. func init() {
  490. proto.RegisterType((*ExportAssetsRequest)(nil), "google.cloud.asset.v1.ExportAssetsRequest")
  491. proto.RegisterType((*ExportAssetsResponse)(nil), "google.cloud.asset.v1.ExportAssetsResponse")
  492. proto.RegisterType((*BatchGetAssetsHistoryRequest)(nil), "google.cloud.asset.v1.BatchGetAssetsHistoryRequest")
  493. proto.RegisterType((*BatchGetAssetsHistoryResponse)(nil), "google.cloud.asset.v1.BatchGetAssetsHistoryResponse")
  494. proto.RegisterType((*OutputConfig)(nil), "google.cloud.asset.v1.OutputConfig")
  495. proto.RegisterType((*GcsDestination)(nil), "google.cloud.asset.v1.GcsDestination")
  496. proto.RegisterEnum("google.cloud.asset.v1.ContentType", ContentType_name, ContentType_value)
  497. }
  498. // Reference imports to suppress errors if they are not otherwise used.
  499. var _ context.Context
  500. var _ grpc.ClientConn
  501. // This is a compile-time assertion to ensure that this generated file
  502. // is compatible with the grpc package it is being compiled against.
  503. const _ = grpc.SupportPackageIsVersion4
  504. // AssetServiceClient is the client API for AssetService service.
  505. //
  506. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  507. type AssetServiceClient interface {
  508. // Exports assets with time and resource types to a given Cloud Storage
  509. // location. The output format is newline-delimited JSON.
  510. // This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you
  511. // to keep track of the export.
  512. ExportAssets(ctx context.Context, in *ExportAssetsRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
  513. // Batch gets the update history of assets that overlap a time window.
  514. // For RESOURCE content, this API outputs history with asset in both
  515. // non-delete or deleted status.
  516. // For IAM_POLICY content, this API outputs history when the asset and its
  517. // attached IAM POLICY both exist. This can create gaps in the output history.
  518. // If a specified asset does not exist, this API returns an INVALID_ARGUMENT
  519. // error.
  520. BatchGetAssetsHistory(ctx context.Context, in *BatchGetAssetsHistoryRequest, opts ...grpc.CallOption) (*BatchGetAssetsHistoryResponse, error)
  521. }
  522. type assetServiceClient struct {
  523. cc *grpc.ClientConn
  524. }
  525. func NewAssetServiceClient(cc *grpc.ClientConn) AssetServiceClient {
  526. return &assetServiceClient{cc}
  527. }
  528. func (c *assetServiceClient) ExportAssets(ctx context.Context, in *ExportAssetsRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) {
  529. out := new(longrunning.Operation)
  530. err := c.cc.Invoke(ctx, "/google.cloud.asset.v1.AssetService/ExportAssets", in, out, opts...)
  531. if err != nil {
  532. return nil, err
  533. }
  534. return out, nil
  535. }
  536. func (c *assetServiceClient) BatchGetAssetsHistory(ctx context.Context, in *BatchGetAssetsHistoryRequest, opts ...grpc.CallOption) (*BatchGetAssetsHistoryResponse, error) {
  537. out := new(BatchGetAssetsHistoryResponse)
  538. err := c.cc.Invoke(ctx, "/google.cloud.asset.v1.AssetService/BatchGetAssetsHistory", in, out, opts...)
  539. if err != nil {
  540. return nil, err
  541. }
  542. return out, nil
  543. }
  544. // AssetServiceServer is the server API for AssetService service.
  545. type AssetServiceServer interface {
  546. // Exports assets with time and resource types to a given Cloud Storage
  547. // location. The output format is newline-delimited JSON.
  548. // This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you
  549. // to keep track of the export.
  550. ExportAssets(context.Context, *ExportAssetsRequest) (*longrunning.Operation, error)
  551. // Batch gets the update history of assets that overlap a time window.
  552. // For RESOURCE content, this API outputs history with asset in both
  553. // non-delete or deleted status.
  554. // For IAM_POLICY content, this API outputs history when the asset and its
  555. // attached IAM POLICY both exist. This can create gaps in the output history.
  556. // If a specified asset does not exist, this API returns an INVALID_ARGUMENT
  557. // error.
  558. BatchGetAssetsHistory(context.Context, *BatchGetAssetsHistoryRequest) (*BatchGetAssetsHistoryResponse, error)
  559. }
  560. func RegisterAssetServiceServer(s *grpc.Server, srv AssetServiceServer) {
  561. s.RegisterService(&_AssetService_serviceDesc, srv)
  562. }
  563. func _AssetService_ExportAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  564. in := new(ExportAssetsRequest)
  565. if err := dec(in); err != nil {
  566. return nil, err
  567. }
  568. if interceptor == nil {
  569. return srv.(AssetServiceServer).ExportAssets(ctx, in)
  570. }
  571. info := &grpc.UnaryServerInfo{
  572. Server: srv,
  573. FullMethod: "/google.cloud.asset.v1.AssetService/ExportAssets",
  574. }
  575. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  576. return srv.(AssetServiceServer).ExportAssets(ctx, req.(*ExportAssetsRequest))
  577. }
  578. return interceptor(ctx, in, info, handler)
  579. }
  580. func _AssetService_BatchGetAssetsHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  581. in := new(BatchGetAssetsHistoryRequest)
  582. if err := dec(in); err != nil {
  583. return nil, err
  584. }
  585. if interceptor == nil {
  586. return srv.(AssetServiceServer).BatchGetAssetsHistory(ctx, in)
  587. }
  588. info := &grpc.UnaryServerInfo{
  589. Server: srv,
  590. FullMethod: "/google.cloud.asset.v1.AssetService/BatchGetAssetsHistory",
  591. }
  592. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  593. return srv.(AssetServiceServer).BatchGetAssetsHistory(ctx, req.(*BatchGetAssetsHistoryRequest))
  594. }
  595. return interceptor(ctx, in, info, handler)
  596. }
  597. var _AssetService_serviceDesc = grpc.ServiceDesc{
  598. ServiceName: "google.cloud.asset.v1.AssetService",
  599. HandlerType: (*AssetServiceServer)(nil),
  600. Methods: []grpc.MethodDesc{
  601. {
  602. MethodName: "ExportAssets",
  603. Handler: _AssetService_ExportAssets_Handler,
  604. },
  605. {
  606. MethodName: "BatchGetAssetsHistory",
  607. Handler: _AssetService_BatchGetAssetsHistory_Handler,
  608. },
  609. },
  610. Streams: []grpc.StreamDesc{},
  611. Metadata: "google/cloud/asset/v1/asset_service.proto",
  612. }
  613. func init() {
  614. proto.RegisterFile("google/cloud/asset/v1/asset_service.proto", fileDescriptor_asset_service_fdd5d93f8b149ada)
  615. }
  616. var fileDescriptor_asset_service_fdd5d93f8b149ada = []byte{
  617. // 739 bytes of a gzipped FileDescriptorProto
  618. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xc1, 0x6e, 0xd3, 0x4a,
  619. 0x14, 0xad, 0x9d, 0xf7, 0xaa, 0x76, 0x92, 0xe6, 0xe5, 0xcd, 0x7b, 0x45, 0x26, 0x6a, 0xd5, 0xe0,
  620. 0x02, 0x0a, 0x59, 0xd8, 0x4a, 0x8a, 0x84, 0x54, 0x60, 0xd1, 0xa4, 0xa6, 0x89, 0x80, 0x24, 0x72,
  621. 0xd3, 0xa2, 0xa2, 0x22, 0xcb, 0x71, 0xa6, 0xc6, 0x28, 0x99, 0x31, 0x9e, 0x71, 0x4b, 0x85, 0xd8,
  622. 0xc0, 0x27, 0xb0, 0x01, 0x89, 0x2f, 0x60, 0xc9, 0x5f, 0xc0, 0x96, 0x5f, 0x60, 0xc7, 0x4f, 0x20,
  623. 0xcf, 0x38, 0xad, 0x43, 0xe3, 0xa2, 0x76, 0xe7, 0x7b, 0x7d, 0xee, 0xb9, 0x77, 0xce, 0x99, 0xb9,
  624. 0xe0, 0x96, 0x4b, 0x88, 0x3b, 0x44, 0xba, 0x33, 0x24, 0xe1, 0x40, 0xb7, 0x29, 0x45, 0x4c, 0x3f,
  625. 0xac, 0x8a, 0x0f, 0x8b, 0xa2, 0xe0, 0xd0, 0x73, 0x90, 0xe6, 0x07, 0x84, 0x11, 0xb8, 0x28, 0xa0,
  626. 0x1a, 0x87, 0x6a, 0x1c, 0xa1, 0x1d, 0x56, 0x8b, 0x4b, 0x31, 0x83, 0xed, 0x7b, 0xba, 0x8d, 0x31,
  627. 0x61, 0x36, 0xf3, 0x08, 0xa6, 0xa2, 0xa8, 0xa8, 0x9e, 0xc3, 0x3f, 0xc6, 0xac, 0xc6, 0x98, 0x21,
  628. 0xc1, 0x6e, 0x10, 0x62, 0xec, 0x61, 0x57, 0x27, 0x3e, 0x0a, 0x26, 0x88, 0x56, 0x62, 0x10, 0x8f,
  629. 0xfa, 0xe1, 0x81, 0xce, 0xbc, 0x11, 0xa2, 0xcc, 0x1e, 0xf9, 0x02, 0xa0, 0x7e, 0x90, 0xc1, 0x7f,
  630. 0xc6, 0x2b, 0x9f, 0x04, 0x6c, 0x83, 0x93, 0x9b, 0xe8, 0x65, 0x88, 0x28, 0x83, 0x57, 0xc0, 0xac,
  631. 0x6f, 0x07, 0x08, 0x33, 0x45, 0x2a, 0x49, 0xe5, 0x79, 0x33, 0x8e, 0xe0, 0x1d, 0x30, 0x1f, 0x20,
  632. 0x7b, 0x60, 0x45, 0x3c, 0x8a, 0x5c, 0x92, 0xca, 0xd9, 0x5a, 0x51, 0x8b, 0x8f, 0x38, 0x6e, 0xa2,
  633. 0xf5, 0xc6, 0x4d, 0xcc, 0xb9, 0x08, 0x1c, 0x85, 0x70, 0x05, 0x64, 0x85, 0x3c, 0xec, 0xd8, 0x47,
  634. 0x54, 0xc9, 0x94, 0x32, 0xe5, 0x79, 0x13, 0xf0, 0x54, 0x2f, 0xca, 0x40, 0x03, 0xe4, 0x1c, 0x82,
  635. 0x19, 0xc2, 0x02, 0xa2, 0xfc, 0x55, 0x92, 0xca, 0xf9, 0x9a, 0xaa, 0x4d, 0xd5, 0x4f, 0x6b, 0x08,
  636. 0x68, 0x54, 0x6a, 0x66, 0x9d, 0xd3, 0x00, 0x36, 0xc1, 0x02, 0x09, 0x99, 0x1f, 0x32, 0xcb, 0x21,
  637. 0xf8, 0xc0, 0x73, 0x95, 0xbf, 0xf9, 0x90, 0xab, 0x29, 0x3c, 0x1d, 0x8e, 0x6d, 0x70, 0xa8, 0x99,
  638. 0x23, 0x89, 0x48, 0xfd, 0x28, 0x81, 0xff, 0x27, 0xa5, 0xa1, 0x3e, 0xc1, 0x14, 0x4d, 0x6a, 0x20,
  639. 0x5d, 0x40, 0x83, 0x33, 0xb3, 0xc9, 0x97, 0x9d, 0xed, 0xa7, 0x04, 0x96, 0xea, 0x36, 0x73, 0x9e,
  640. 0x6f, 0xa1, 0x78, 0xba, 0xa6, 0x47, 0x19, 0x09, 0x8e, 0xff, 0xe4, 0xdf, 0x89, 0x0d, 0xd8, 0x1e,
  641. 0x21, 0xaa, 0xc8, 0x09, 0x1b, 0xda, 0x51, 0xe6, 0x8c, 0x0d, 0x99, 0xcb, 0xd9, 0xf0, 0x10, 0x14,
  642. 0x4e, 0x34, 0xb2, 0x8e, 0x3c, 0x3c, 0x20, 0x47, 0xdc, 0xd1, 0x6c, 0xed, 0x5a, 0x0a, 0x55, 0xa4,
  643. 0xd0, 0x13, 0x0e, 0x34, 0xf3, 0x63, 0xc5, 0x44, 0xac, 0x3e, 0x03, 0xcb, 0x29, 0x87, 0x8d, 0x1d,
  644. 0xb9, 0x07, 0x66, 0xc5, 0xdb, 0x50, 0xa4, 0x52, 0xa6, 0x9c, 0xad, 0x5d, 0x4f, 0xeb, 0x81, 0x46,
  645. 0x3e, 0x09, 0xec, 0x21, 0x67, 0x31, 0xe3, 0x1a, 0x95, 0x80, 0x5c, 0x52, 0x6a, 0xd8, 0x05, 0xff,
  646. 0xb8, 0x0e, 0xb5, 0x06, 0x88, 0x32, 0x0f, 0xf3, 0xe7, 0x14, 0xbb, 0x7c, 0x23, 0x85, 0x76, 0xcb,
  647. 0xa1, 0x9b, 0xa7, 0xe0, 0xe6, 0x8c, 0x99, 0x77, 0x27, 0x32, 0xf5, 0x05, 0x90, 0x4d, 0xb0, 0xa9,
  648. 0x35, 0x90, 0x9f, 0x2c, 0x81, 0x10, 0x64, 0xc2, 0xc0, 0x13, 0x5e, 0x35, 0x67, 0xcc, 0x28, 0xa8,
  649. 0xe7, 0x00, 0x20, 0xfd, 0x17, 0xc8, 0x61, 0x56, 0x18, 0x78, 0x95, 0x16, 0xc8, 0x26, 0xc4, 0x86,
  650. 0x4b, 0x40, 0x69, 0x74, 0xda, 0x3d, 0xa3, 0xdd, 0xb3, 0x7a, 0x7b, 0x5d, 0xc3, 0xda, 0x69, 0x6f,
  651. 0x77, 0x8d, 0x46, 0xeb, 0x41, 0xcb, 0xd8, 0x2c, 0xcc, 0xc0, 0x1c, 0x98, 0x33, 0x8d, 0xed, 0xce,
  652. 0x8e, 0xd9, 0x30, 0x0a, 0x12, 0xcc, 0x03, 0xd0, 0xda, 0x78, 0x6c, 0x75, 0x3b, 0x8f, 0x5a, 0x8d,
  653. 0xbd, 0x82, 0x5c, 0xfb, 0x2a, 0x83, 0x1c, 0x57, 0x60, 0x5b, 0x6c, 0x2a, 0xf8, 0x4e, 0x02, 0xb9,
  654. 0xe4, 0x4d, 0x87, 0x95, 0x94, 0x83, 0x4e, 0xd9, 0x14, 0xc5, 0xe5, 0x31, 0x36, 0xb1, 0x88, 0xb4,
  655. 0xce, 0x78, 0x11, 0xa9, 0xe5, 0xb7, 0xdf, 0x7f, 0xbc, 0x97, 0x55, 0x75, 0x39, 0x5a, 0x60, 0xaf,
  656. 0xc5, 0x2d, 0xbc, 0x5f, 0xd1, 0x2b, 0x6f, 0xd6, 0x51, 0x82, 0x6c, 0x5d, 0xaa, 0xc0, 0x2f, 0x12,
  657. 0x58, 0x9c, 0x6a, 0x33, 0x5c, 0x4b, 0x19, 0xe7, 0xbc, 0x17, 0x50, 0xbc, 0x7d, 0xb1, 0x22, 0x71,
  658. 0x93, 0x54, 0x8d, 0x8f, 0x5b, 0x86, 0x37, 0xcf, 0x8c, 0xdb, 0x9f, 0x56, 0x57, 0xff, 0x24, 0x81,
  659. 0xab, 0x0e, 0x19, 0x4d, 0xef, 0x55, 0xff, 0x37, 0x29, 0x73, 0x37, 0x5a, 0x0d, 0x5d, 0xe9, 0xe9,
  660. 0x7a, 0x8c, 0x75, 0xc9, 0xd0, 0xc6, 0xae, 0x46, 0x02, 0x57, 0x77, 0x11, 0xe6, 0x8b, 0x43, 0x17,
  661. 0xbf, 0x6c, 0xdf, 0xa3, 0xbf, 0xed, 0xfe, 0xbb, 0xfc, 0xe3, 0xb3, 0xbc, 0xb8, 0x25, 0x8a, 0x1b,
  662. 0xbc, 0x11, 0xa7, 0xd7, 0x76, 0xab, 0xdf, 0xc6, 0xf9, 0x7d, 0x9e, 0xdf, 0xe7, 0xf9, 0xfd, 0xdd,
  663. 0x6a, 0x7f, 0x96, 0xd3, 0xae, 0xfd, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xb5, 0xf3, 0x28, 0xb1,
  664. 0x06, 0x00, 0x00,
  665. }