github.com/cloudwan/edgelq-sdk@v1.15.4/audit/resources/v1alpha2/activity_log/activity_log.pb.collections.go (about)

     1  // Code generated by protoc-gen-goten-resource
     2  // Resource: ActivityLog
     3  // DO NOT EDIT!!!
     4  
     5  package activity_log
     6  
     7  import (
     8  	gotenresource "github.com/cloudwan/goten-sdk/runtime/resource"
     9  )
    10  
    11  // proto imports
    12  import (
    13  	common "github.com/cloudwan/edgelq-sdk/audit/resources/v1alpha2/common"
    14  	rpc "github.com/cloudwan/edgelq-sdk/common/rpc"
    15  	iam_organization "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/organization"
    16  	iam_project "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/project"
    17  	meta "github.com/cloudwan/goten-sdk/types/meta"
    18  	anypb "google.golang.org/protobuf/types/known/anypb"
    19  	fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
    20  	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
    21  )
    22  
    23  // ensure the imports are used
    24  var (
    25  	_ = new(gotenresource.ListQuery)
    26  )
    27  
    28  // make sure we're using proto imports
    29  var (
    30  	_ = &common.Authentication{}
    31  	_ = &rpc.Status{}
    32  	_ = &iam_organization.Organization{}
    33  	_ = &iam_project.Project{}
    34  	_ = &anypb.Any{}
    35  	_ = &fieldmaskpb.FieldMask{}
    36  	_ = &timestamppb.Timestamp{}
    37  	_ = &meta.Meta{}
    38  )
    39  
    40  type ActivityLogList []*ActivityLog
    41  
    42  func (l ActivityLogList) Append(item gotenresource.Resource) gotenresource.ResourceList {
    43  	return append(l, item.(*ActivityLog))
    44  }
    45  
    46  func (l ActivityLogList) AppendList(list gotenresource.ResourceList) gotenresource.ResourceList {
    47  	return append(l, list.(ActivityLogList)...)
    48  }
    49  
    50  func (l ActivityLogList) Slice(first, second int) gotenresource.ResourceList {
    51  	if first > 0 && second > 0 {
    52  		return l[first:second]
    53  	} else if first > 0 {
    54  		return l[first:]
    55  	} else if second > 0 {
    56  		return l[:second]
    57  	}
    58  	return l[:]
    59  }
    60  
    61  func (l ActivityLogList) At(idx int) gotenresource.Resource {
    62  	return l[idx]
    63  }
    64  
    65  func (l ActivityLogList) Set(idx int, res gotenresource.Resource) {
    66  	l[idx] = res.(*ActivityLog)
    67  }
    68  
    69  func (l ActivityLogList) Length() int {
    70  	return len(l)
    71  }
    72  
    73  type ActivityLogNameList []*Name
    74  
    75  func (l ActivityLogNameList) Append(name gotenresource.Name) gotenresource.NameList {
    76  	return append(l, name.(*Name))
    77  }
    78  
    79  func (l ActivityLogNameList) AppendList(list gotenresource.NameList) gotenresource.NameList {
    80  	return append(l, list.(ActivityLogNameList)...)
    81  }
    82  
    83  func (l ActivityLogNameList) Slice(first, second int) gotenresource.NameList {
    84  	if first > 0 && second > 0 {
    85  		return l[first:second]
    86  	} else if first > 0 {
    87  		return l[first:]
    88  	} else if second > 0 {
    89  		return l[:second]
    90  	}
    91  	return l[:]
    92  }
    93  
    94  func (l ActivityLogNameList) At(idx int) gotenresource.Name {
    95  	return l[idx]
    96  }
    97  
    98  func (l ActivityLogNameList) Set(idx int, name gotenresource.Name) {
    99  	l[idx] = name.(*Name)
   100  }
   101  
   102  func (l ActivityLogNameList) Length() int {
   103  	return len(l)
   104  }
   105  
   106  type ActivityLogReferenceList []*Reference
   107  
   108  func (l ActivityLogReferenceList) Append(ref gotenresource.Reference) gotenresource.ReferenceList {
   109  	return append(l, ref.(*Reference))
   110  }
   111  
   112  func (l ActivityLogReferenceList) AppendList(list gotenresource.ReferenceList) gotenresource.ReferenceList {
   113  	return append(l, list.(ActivityLogReferenceList)...)
   114  }
   115  
   116  func (l ActivityLogReferenceList) Slice(first, second int) gotenresource.ReferenceList {
   117  	if first > 0 && second > 0 {
   118  		return l[first:second]
   119  	} else if first > 0 {
   120  		return l[first:]
   121  	} else if second > 0 {
   122  		return l[:second]
   123  	}
   124  	return l[:]
   125  }
   126  
   127  func (l ActivityLogReferenceList) At(idx int) gotenresource.Reference {
   128  	return l[idx]
   129  }
   130  
   131  func (l ActivityLogReferenceList) Set(idx int, ref gotenresource.Reference) {
   132  	l[idx] = ref.(*Reference)
   133  }
   134  
   135  func (l ActivityLogReferenceList) Length() int {
   136  	return len(l)
   137  }
   138  
   139  type ActivityLogParentNameList []*ParentName
   140  
   141  func (l ActivityLogParentNameList) Append(name gotenresource.Name) gotenresource.ParentNameList {
   142  	return append(l, name.(*ParentName))
   143  }
   144  
   145  func (l ActivityLogParentNameList) AppendList(list gotenresource.ParentNameList) gotenresource.ParentNameList {
   146  	return append(l, list.(ActivityLogParentNameList)...)
   147  }
   148  
   149  func (l ActivityLogParentNameList) Slice(first, second int) gotenresource.ParentNameList {
   150  	if first > 0 && second > 0 {
   151  		return l[first:second]
   152  	} else if first > 0 {
   153  		return l[first:]
   154  	} else if second > 0 {
   155  		return l[:second]
   156  	}
   157  	return l[:]
   158  }
   159  
   160  func (l ActivityLogParentNameList) At(idx int) gotenresource.Name {
   161  	return l[idx]
   162  }
   163  
   164  func (l ActivityLogParentNameList) Set(idx int, name gotenresource.Name) {
   165  	l[idx] = name.(*ParentName)
   166  }
   167  
   168  func (l ActivityLogParentNameList) Length() int {
   169  	return len(l)
   170  }
   171  
   172  type ActivityLogParentReferenceList []*ParentReference
   173  
   174  func (l ActivityLogParentReferenceList) Append(ref gotenresource.Reference) gotenresource.ParentReferenceList {
   175  	return append(l, ref.(*ParentReference))
   176  }
   177  
   178  func (l ActivityLogParentReferenceList) AppendList(list gotenresource.ParentReferenceList) gotenresource.ParentReferenceList {
   179  	return append(l, list.(ActivityLogParentReferenceList)...)
   180  }
   181  
   182  func (l ActivityLogParentReferenceList) Slice(first, second int) gotenresource.ParentReferenceList {
   183  	if first > 0 && second > 0 {
   184  		return l[first:second]
   185  	} else if first > 0 {
   186  		return l[first:]
   187  	} else if second > 0 {
   188  		return l[:second]
   189  	}
   190  	return l[:]
   191  }
   192  
   193  func (l ActivityLogParentReferenceList) At(idx int) gotenresource.Reference {
   194  	return l[idx]
   195  }
   196  
   197  func (l ActivityLogParentReferenceList) Set(idx int, ref gotenresource.Reference) {
   198  	l[idx] = ref.(*ParentReference)
   199  }
   200  
   201  func (l ActivityLogParentReferenceList) Length() int {
   202  	return len(l)
   203  }
   204  
   205  type ActivityLogMap map[Name]*ActivityLog
   206  
   207  func (m ActivityLogMap) Get(name gotenresource.Name) gotenresource.Resource {
   208  	return m[*name.(*Name)]
   209  }
   210  
   211  func (m ActivityLogMap) Set(res gotenresource.Resource) {
   212  	tRes := res.(*ActivityLog)
   213  	m[*tRes.Name] = tRes
   214  }
   215  
   216  func (m ActivityLogMap) Delete(name gotenresource.Name) {
   217  	delete(m, *name.(*Name))
   218  }
   219  
   220  func (m ActivityLogMap) Length() int {
   221  	return len(m)
   222  }
   223  
   224  func (m ActivityLogMap) ForEach(cb func(gotenresource.Name, gotenresource.Resource) bool) {
   225  	for name, res := range m {
   226  		if !cb(&name, res) {
   227  			break
   228  		}
   229  	}
   230  }